<%= form_tag(order_operator_path, :method => :get) do |f| %>
  <div class="filterContainer">
    <div class="filterLabel"><%= t("site.cms.operator.order.filter.label.status") %></div>
    <div class="filterValue"><%= select("filter", "status", %w[new approved payed rejected].map do |item|
          [t("site.cms.operator.order.status.#{item}"), item] end, :include_blank => t("site.cms.operator.order.status.all")) %></div>
  </div>
  <div class="filterContainer">
    <div class="filterLabel"><%= t("site.cms.operator.order.filter.label.operator") %></div>
    <div class="filterValue"><%= select("filter", "operator_id", User.joins(:roles).where("roles.name = 'operator'").uniq.map do |operator|
          ["#{operator.login} - #{operator.firstname} #{operator.lastname} (id: #{operator.id})", operator.id] end,
        :include_blank => t("site.cms.operator.order.operator_id.all")) %></div>
  </div>
  <div class="filterContainer">
    <div class="filterLabel"><%= t("site.cms.operator.order.filter.label.start_date") %></div>
    <div class="filterValue"><%= date_select("filter", "start_date", :start_year => 2011, :end_year => Date.today.year, :order => [:day, :month, :year],
        :prompt => { :day => t("date.day"), :month => t("date.month"), :year => t("date.year") }) %></div>
  </div>
  <div class="filterContainer">
    <div class="filterLabel"><%= t("site.cms.operator.order.filter.label.end_date") %></div>
    <div class="filterValue"><%= date_select("filter", "end_date", :start_year => 2011, :end_year => Date.today.year, :order => [:day, :month, :year],
        :prompt => { :day => t("date.day"), :month => t("date.month"), :year => t("date.year") }) %></div>
  </div>
  <%= submit_tag "filter" %>
<% end %>
<div class="exportExcel"><%= link_to "Export", [order_excel_path, params[:filter].to_param].join("?") %></div>
<div class="homeButton"><%= link_to (image_tag("/images/buttons/homeButton.jpg", :alt => "24_menu", :class => "homeImage")),  root_path, :class => "homeLink" %></div>